# -*- ruby -*-

require 'rubygems'
require 'bundler/setup'

require 'rjack-tarpit'

RJack::TarPit.new( 'rjack-tarpit' ) do |tp|

  desc "Check that README sample has latest version"
  task :check_sample_version do
    tp.test_line_match( 'README.rdoc',
                        /^\s*gem.+rjack-tarpit/,
                        /#{ RJack::TarPit::MINOR_VERSION }/ )
  end
  [ :gem, :tag, :push ].each { |t| task t => :check_sample_version }

end

desc "Upload RDOC to Amazon S3 (rdoc.gravitext.com/rjack, Oregon)"
task :publish_rdoc => [ :clean, :rerdoc ] do
  sh <<-SH
    aws s3 sync --acl public-read doc/ s3://rjack.gravitext.com/tarpit/
  SH
end
